import request from '@/config/axios'

//获取列表
export const getKeywordPage = (params) => {
  return request.getOriginal({
    url: '/amp/feature-keyword/page',
    params
  })
}

// 查询详情
export const getKeyword = (id: number) => {
  return request.get({ url: '/amp/feature-keyword/get?id=' + id })
}

// 新增
export const createKeyword = (data) => {
  return request.post({ url: '/amp/feature-keyword/create', data: data })
}

// 修改
export const updateKeyword = (params) => {
  return request.put({ url: '/amp/feature-keyword/update', data: params })
}

// 删除
export const deleteKeyword = (id: number) => {
  return request.delete({ url: '/amp/feature-keyword/delete?id=' + id })
}

//获得关键词组
export const getKeywordType = () => {
  return request.get({ url: '/amp/feature-keyword/get-keyword-type' })
}

//获得上级关键词组
export const getKeywordTree = () => {
  return request.get({ url: '/amp/feature-keyword/tree' })
}
